home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
tools
/
czesc_2
/
guispell-1.0
/
rexx
/
ced
/
wordspellcallback.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1992-03-25
|
1KB
|
48 lines
/*
* WordSpellCallBack.rexx ... needed by WordSpell.ced.
* Copyright © 1991 Loren J. Rittle
* Reworked for GUISpell public release: Thu Mar 26 02:12:39 1992 LJR
* Use as you will, just document your changes and keep my copyright
* notice intact.
*
* Loren J. Rittle
* l-rittle@uiuc.edu
*/
options results
address 'rexx_ced'
parse arg oldbytepos oldlinepos olditem
status 87; bytepos = result; if bytepos ~= oldbytepos then exit;
status 57; linepos = result; if linepos ~= oldlinepos then exit;
status 55; line = result;
parse var line curline '0a'x
curpos = 0
do forever
curpos=pos('09'x, curline, curpos+1)
if curpos == 0 then break
curline = overlay(' ', curline, curpos)
end
do i = 1 to words(curline)
if wordindex(curline, i)-1 > bytepos then
break
end
item = compress( word( curline, i-1 ), ' ~`,./<>?;:"[]{}!@#$%^&*()+|=\' )
if item ~= olditem then exit;
address 'GUISpell' currenttext
replacementword = result
right
search for... item 0 0 0 1
if rc ~= 0 then exit;
status 57; linepos = result; if linepos ~= oldlinepos then exit;
left
replace item replacementword 0 0 1 1
exit